using System;
using System.Collections.Generic;
using System.Text;
using Dapper.Contrib.Extensions;
using Publicuse.Entity.AttributeUtil;
using SqlSugar;

namespace Publicuse.Entity
{
  /// <summary>
  /// 用户角色管理
  /// </summary>
  [DBTable("`geeker-userrole`", "用户角色信息")]
  [Table("`geeker-userrole`")]
  [SugarTable("`geeker-userrole`")]
  public partial class UserRole : BaseModel<long>
  {
    [Remark("角色编号")]
    public string rids { get; set; }

    [Remark("用户编号")]
    public long uId { get; set; }

    [Remark("类型 1=后台 2=小程序")]
    public int type { get; set; }

    public UserRole()
    {
      this.Id = 0;
    }
  }

  public class UserRoleExtend : UserRole
  {
    [NoQuery]
    [Remark("用户账号")]
    public string uCode { get; set; }

    [NoQuery]
    [Remark("角色名称")]
    public string rName { get; set; }

    public UserRoleExtend()
    {
      this.uCode = string.Empty;
      this.rName = string.Empty;
    }
  }

  /// <summary>
  /// 用户角色查询参数
  /// </summary>
  public class UserRoleQuery : CommonQuery
  {
    public int urId { get; set; }

    public string uCode { get; set; }

    public string rName { get; set; }

    public int urStatus { get; set; }
  }
}
